<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<style>
			input{
				width: 60px;
				height: 20px;
				padding-left: 10px;
			}
		</style>
		<!--<input type="" name="w" id="w" value="" />*
		<input type="" name="h" id="h" value="" />=
		<input type="" name="s" id="s" value="" />平方厘米
		<a href="javascript:S()">得出结果</a>-->
		<br>
		<br>
		<br>
		<br>
		<input type="text"name="num" id="num"/>
		
		<a href="javascript:a_is_what()">点我！！</a>
		<br>
		<br>
		<br>
		<br>
		<input type="text"name="src" id="src"/>
		
		<a id="check" href="javascript:void(0)">点我查看露挺工资！！</a>
		<script>
//			var loc = "位置";
//			var birth = "生日";
//			var height = "身高";
//			var weight1 = "体重";
//			var city = "国籍";
//			document.write("姚明个人信息<br><br>")
//			document.write(loc+"：中锋<br>")
//			document.write(birth+"：09/12/80<br>")
//			document.write(height+"：2.26M<br>")
//			document.write(weight1+"：140.6kg<br>")
//			document.write(city+"：中国<br>")
//			function S(){
//				width =document.getElementById("w").value;
//				height =document.getElementById("h").value;
//				s =document.getElementById("s");
//				var w = parseInt(width);
//				var h = parseInt(height);
//				s.value=w*h;
//			}
			function a_is_what(){
				a = document.getElementById("num").value;
				if(a<0){
					alert("负数");
				}
				if(a>0){
					alert("正数");
				}
				if(a==0){
					alert("这是0");
				}
			}
			function luting_scorce(selector1,selector2){
				var but = document.querySelector(selector2);
				but.addEventListener('click',function(){
					var s = document.querySelector(selector1);
					if(s.value>=60){
						alert("及格,工资有3000了!");
					}
					if(s.value<60){
						alert("这个月又要吃土了")
					}
				})
			}
			new luting_scorce("#src","#check")
		</script>
	</body>
</html>
